<!DOCTYPE html>
<html lang="zh-CN">

<head>
    {{template "common/head.html"}}
    <style type="text/css">
        .text-justity {
            width: 65px;
            float: left;
            font-weight: 700;
        }

        .book-name {
            border-bottom: 1px solid #DDD;
            font-size: 18px;
            margin-bottom: 12px;
            line-height: 28px;
        }

        .book-describe {
            font-size: 16px;
            margin-bottom: 12px;
            line-height: 28px;
        }
    </style>
</head>

<body>
    <img src="/static/images/header.jpg" width="100%" />
    <div class="container-fluid">
        <div class="row">
            {{template "common/header.html"}}
        </div>
        <div class="row bg-tran zbox">
            {{if .book}}
            <img class="col-sm-3" src="{{.book.Picture}}" style="max-width: 300px;">
            <div class="col-sm-9">
                <div class="book-name">
                    <a class="abtn">{{.book.Name}}</a>
                </div>
                <div>
                    <div class="line book-describe">
                        <span class="text-justity">作者</span>
                        <strong>:</strong>
                        <span>{{if .book.AuthorNationality}}[{{.book.AuthorNationality}}]{{end}}
                            <a class="abtn">{{.book.Author}}</a>
                        </span>
                    </div>
                    <div class="line book-describe">
                        <span class="text-justity">出版时间</span>
                        <strong>:</strong>
                        <span class="text-common">{{.book.PublicationTime}}</span>
                    </div>
                </div>
                <div class="book-describe">
                    <span class="text-justity">出版社</span>
                    <strong>:</strong>
                    <a class="abtn">{{.book.Publisher}}</a>
                </div>
                <div class="book-describe">
                    <span class="text-justity">淘书网价</span>
                    <strong>:</strong>
                    <span class="price">￥{{.book.Price}}</span>
                </div>
                <div class="book-describe">
                    <span class="text-justity">内容简介</span>
                    <strong>:</strong>
                    <p>{{.book.Summary}}</p>
                </div>
                <div class="book-describe">
                    <span class="text-justity">配送至</span>
                    <strong>:</strong>
                    <input {{if eq .book.Remaining 0}} disabled {{end}} />&nbsp;&nbsp;
                    <strong>{{if gt .book.Remaining 0}}有货{{else}}无货{{end}}</strong>&nbsp;&nbsp;
                    <strong>免运费</strong>
                </div>
                <div class="book-describe">
                    <span class="text-justity">服务</span>
                    <strong>:</strong>
                    <span>由“淘书网”发货，并提供售后服务。</span>
                </div>
                <div class="row">
                    <input type="number" class="form-control" {{if gt .book.Remaining 0}} value="1" min="1" max="{{.book.Remaining}}" {{else}}
                        disabled {{end}} style="max-width: 100px; float: left;margin-right: 25px;" />
                    <a class="btn btn-danger">加入购物车</a>
                    <a class="btn btn-danger">立刻购买</a>
                    <a class="btn btn-primary">购买电子书</a>
                </div>
            </div>
            {{end}}
        </div>
    </div>
</body>

</html>